
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div id="searchDiv" class="ibox " style="display: none;">
	<div class="ibox-title collapse-link" style="cursor: pointer;"
		title="展开/收起查询条件">

		<h5>查询条件</h5>
		<div class="ibox-tools"></div>

	</div>
	
	<form action="web/gLBalance/getGLBalanceList" method="get">
	<div class="ibox-content m-b-sm border-bottom">
		<div class="row">
			<div class="col-sm-6">
				<div class="form-group">
					<label class="control-label" for="ledgerCode">分类账簿</label> 
					<select name="ledgerCode" id="ledgerCode" class="form-control">
						<option value="" selected="">请选择</option>
						<option value="${requestScope.glLedger.ledgerCode}">${requestScope.glLedger.ledgerName}</option>
					</select>
				</div>
			</div>
			<div class="col-sm-6">
				<div class="form-group">
					<label class="control-label" for="periodName">会计期间</label> 
					<select name="periodName" id="periodName" class="form-control">
						<option value="" selected="">请选择</option>
						<c:forEach items="${requestScope.calendarPeriodList}" var="calendarPeriod">
                       		<option value="${calendarPeriod.periodName}">${calendarPeriod.periodName}</option>
                       	</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12 text-right">
				<div class="form-group">
					<button type="submit" class="btn btn-w-m btn-primary">查询</button>
				</div>
			</div>
		</div>
	</div>
	
	<%-- 隐藏字段 --%>
	<input type="hidden" name="page" value="1">
	</form>
</div>

<script>
$(document).ready(function(){
	//设置ledgerCode默认值
	if("${param.ledgerCode}"!=""){
		$("#ledgerCode").val("${param.ledgerCode}");
	}
	//设置periodName默认值
	if("${param.periodName}"!=""){
		$("#periodName").val("${param.periodName}");
	}
});
</script>
